package com.petter.jvm.stack;

/**
 * @author : GD
 * @date :2021/9/26 : 15:18
 */
public class DynamicTest {

    public class Animal{

        void eat(){
            System.out.println("animal eat things");
        }
    }

    public class Cat extends Animal implements Huntable{

        @Override
        public void hunt() {
            System.out.println("cat hunt mouse");
        }

        @Override
        void eat() {
            super.eat();
            System.out.println("cat eat mouse");
        }
    }


    interface Huntable{
        void hunt();
    }

}
